package com.example.demo.service.impl;

import com.example.demo.dao.AllDao;
import com.example.demo.po.dzmodel;
import com.example.demo.po.plmodel;
import com.example.demo.service.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.Id;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@org.springframework.stereotype.Service
@Transactional
public class ServiceImpl implements Service {
    @Autowired
    AllDao pd;
//    查询所有评论接口实现
    public List<plmodel> findAll(){
        return pd.findAll();
    }

//    查询所有点赞数接口实现
    @Override
    public int selectdz() {
       return pd.selectdz();
    }

//    点赞实现接口实现
    @Override
    public void  countdz(int number) {
       pd.countdz(number);
    }

//    添加评论接口实现
    public void add(String pltext){
       pd.add(pltext);
    }

//    删除评论接口实现
    @Override
    public void delete(int id) {
        pd.delete(id);
    }
}
